package com.newtouch.cq.lang.exception;

import lombok.Getter;

/**
 * 业务异常类
 *
 * @author Alex
 */
@Getter
public class MccBizException extends RuntimeException implements IMccExceptionInfo<String> {

    private String code;

    private String message;

    public MccBizException(IMccExceptionInfo<String> exceptInfo) {
        super(exceptInfo.getMessage());
        this.message = exceptInfo.getMessage();
        this.code = exceptInfo.getCode();
    }

    public MccBizException setMessage(String message) {
        this.message = message;
        return this;
    }
}
